Skip to main content
Feedback

Creating policy templates

Creating a policy template allows teams to define a set of policy rules once and reuse them across multiple APIs. The Configure APIs and Applications > Manage APIs > Policy Templates tab in API Management provides the interface for building templates.

In the user interface, policy templates can only reference pre-existing policy rules, requiring administrators to create any required rules before bundling them into a template. Alternatively, the GraphQL API apiPolicyTemplateCreate mutation permits inline creation of new policy rules and attaches them directly during the template creation process.

Selecting and ordering policy rules forms the core structure of a template. The UI requires at least one rule and disables the rule selection commitment button until an operator checks at least one rule; the backend, however, does not enforce this and can persist a template with no rules.

Execution timing is configured individually for each policy rule within the template hierarchy rather than applied globally across the entire template. Setting execution timing within the template overrides that rule's own standalone timing configuration whenever the Gateway executes the template.

Execution order can be changed after initial creation, from the template's edit screen, but only among rules that share the same execution timing.

Prerequisites

  • One or more existing policy rules configured in Boomi API Gateway. (Required in the UI; not enforced by the backend, which can persist a template with no rules.)
  • The API Management - APIs privilege, included in the API Manager and API Administrator roles. Without it, the Policy Templates list still displays, but create, edit, and delete actions are unavailable. Refer to API Management Roles and Privileges.

To create a policy template:

  1. Go to Configure APIs and Applications > Manage APIs, and select the Policy Templates tab.
  2. Click Create Policy Template.
  3. Enter a name and, optionally, a description.
  4. In Policy Rules, use Search Policy Rules to find and select the rules to include, and reorder them if needed.
  5. For each rule you select, choose its Execution Timing.
  6. Click Save.

To change a template's policies after you create it, refer to Editing a policy template.

Watch this video for a comprehensive walkthrough on creating, editing, and attaching policy templates, including how they show up automatically in API Control Plane (ACP) for you to view and apply.

You can also create a policy template programmatically using the apiPolicyTemplateCreate mutation. Alternatively, the deployedApiCreate mutation deploys the API, creates the template, and assigns it to that API in a single operation.

On this Page